/* 学习中心页面样式 */
.learning-content {
    max-width: 1200px;
    margin: 0 auto;
}

.language-selection {
    margin-bottom: 40px;
}

.language-selection h2 {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 20px;
}

.language-tabs {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.lang-tab {
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    padding: 8px 16px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
}

.lang-tab:hover {
    background-color: #EDF2F7;
}

.lang-tab.active {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.learning-modules {
    display: flex;
    flex-direction: column;
    gap: 30px;
    margin-bottom: 40px;
}

.learning-module {
    background-color: var(--bg-primary);
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    overflow: hidden;
}

.module-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    background-color: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
}

.module-header h3 {
    font-size: 18px;
    font-weight: 600;
}

.difficulty-badge {
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}

.beginner {
    background-color: #E6F6EC;
    color: #0E9F6E;
}

.intermediate {
    background-color: #E6F0F9;
    color: #3182CE;
}

.advanced {
    background-color: #F9E6E6;
    color: #E53E3E;
}

.module-content {
    padding: 20px;
}

.module-content p {
    margin-bottom: 20px;
}

.scenario-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 20px;
}

.scenario-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 15px;
    background-color: var(--bg-secondary);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.scenario-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.scenario-item img {
    width: 48px;
    height: 48px;
}

.phrase-categories {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.phrase-category {
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    padding: 8px 16px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
}

.phrase-category:hover {
    background-color: #EDF2F7;
}

.phrase-category.active {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.phrase-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.phrase-item {
    display: flex;
    align-items: center;
    padding: 15px;
    background-color: var(--bg-secondary);
    border-radius: 8px;
}

.phrase-original {
    flex: 1;
    font-weight: 500;
}

.phrase-translation {
    flex: 1;
    color: var(--text-secondary);
}

.phrase-audio-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
}

.learning-progress {
    background-color: var(--bg-primary);
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.learning-progress h2 {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 20px;
}

.progress-stats {
    display: flex;
    justify-content: space-around;
    margin-bottom: 30px;
}

.progress-stat {
    text-align: center;
}

.stat-value {
    font-size: 24px;
    font-weight: 600;
    color: var(--primary-color);
}

.stat-label {
    font-size: 14px;
    color: var(--text-secondary);
}

.progress-bar-container {
    margin-bottom: 30px;
}

.progress-label {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    font-size: 14px;
}

.progress-bar {
    height: 8px;
    background-color: var(--bg-secondary);
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background-color: var(--primary-color);
}

/* 对话模态框样式 */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background-color: var(--bg-primary);
    border-radius: 12px;
    width: 90%;
    max-width: 600px;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid var(--border-color);
}

.modal-header h2 {
    font-size: 20px;
    font-weight: 600;
}

.close-modal {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: var(--text-secondary);
}

.modal-body {
    padding: 20px;
}

.dialog-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.dialog-message {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    max-width: 80%;
}

.dialog-message.other {
    align-self: flex-start;
}

.dialog-message.user {
    align-self: flex-end;
    flex-direction: row-reverse;
}

.message-content {
    padding: 15px;
    border-radius: 12px;
    background-color: var(--bg-secondary);
}

.dialog-message.user .message-content {
    background-color: var(--primary-light);
    color: white;
}

.audio-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
}

.dialog-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 20px;
}

.dialog-options p {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 10px;
}

.dialog-option {
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 12px;
    text-align: left;
    cursor: pointer;
    transition: all 0.2s;
}

.dialog-option:hover {
    background-color: #EDF2F7;
}

.modal-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-top: 1px solid var(--border-color);
}

.dialog-progress {
    font-size: 14px;
    color: var(--text-secondary);
}

@media (max-width: 768px) {
    .scenario-list {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .progress-stats {
        flex-direction: column;
        gap: 20px;
    }
    
    .modal-content {
        width: 95%;
    }
}